# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=truegaze
pkgver=117.c3f26bc
pkgrel=8
pkgdesc='Static analysis tool for Android/iOS apps focusing on security issues outside the source code.'
groups=('blackarch' 'blackarch-mobile' 'blackarch-binary')
arch=('any')
url='https://github.com/nightwatchcybersecurity/truegaze'
license=('Apache')
depends=('python' 'python-asn1crypto' 'python-beautifultable' 'python-click'
         'python-cryptography' 'python-jsonschema' 'python-pytest' 'python-toml'
         'python-pytest-cov' 'python-roca-detect' 'python-tldextract'
         'python-requests-mock' 'androguard')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/nightwatchcybersecurity/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

